SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE PROCEDURE [dbo].gspCustomer_SEARCH
(
@customerId int = null,
@customerInfoId int = null,
@createdDate datetime = null,
@isDeleted bit = null
)
AS

SELECT
  *
FROM
  [dbo].[Customer]
WHERE
  (@customerId IS NULL OR [CustomerId] = @customerId)
AND
  (@customerInfoId IS NULL OR [CustomerInfoId] = @customerInfoId)
AND
  (@createdDate IS NULL OR [CreatedDate] = @createdDate)
AND
  (@isDeleted IS NULL OR [IsDeleted] = @isDeleted)


GO
